#ifndef _MVVSREC_H_
#define _MVVSREC_H_

typedef struct _ENCODE_PARAM
{
	BYTE  ENC_Type; //MPEG2 = 0 MPEG4 = 1
	BYTE  VideoFormat;//PAL = 0 NTSC = 1
	DWORD Width;    //720*576  640*480 352*288 
	DWORD Height;
	DWORD VF_Rate;   // MPEG2(NTSC:30fps PAL:25fps) MPEG4(NTSC:30fps/15fps/10fps PAL:25fps/12fps/8fps)
	DWORD VBitRate;  // 200K-8000K
	DWORD ABitRate;  
	DWORD GOPSet;	//保留	 
	DWORD MPEG4_level;//保留
	DWORD Ratio_Aspect;//保留
	DWORD SharpNess;//保留
	DWORD filters_enable;//保留
} ENCODE_PARAM, *PENCODE_PARAM;

typedef UINT (*RecStreamProc)(DWORD wHWCardNo,LPBYTE lpBuffer, DWORD DataLenth, PVOID pUserData);

#ifdef __cplusplus
#define MVVSREC_API extern "C" __declspec (dllexport)
#else
#define MVVSREC_API __declspec (dllexport)
#endif

//打开设备
MVVSREC_API BOOL __stdcall  MVV_OpenDevice(WORD nCardNo);
//关闭设备
MVVSREC_API BOOL __stdcall  MVV_CloseDevice(WORD nCardNo);
//开始录像
MVVSREC_API BOOL __stdcall  MVV_StartRecode(WORD nCardNo,ENCODE_PARAM m_Param);
//停止录像
MVVSREC_API BOOL __stdcall  MVV_StopRecode(WORD nCardNo);

MVVSREC_API BOOL __stdcall  MVV_PauseRecode(WORD nCardNo);
//设置录像文件名
MVVSREC_API BOOL __stdcall  MVV_SetRecFileName(WORD nCardNo,char *FileName);
//设置录像数据回调
MVVSREC_API BOOL __stdcall  MVV_RecStreamHook(WORD nCardNo,RecStreamProc lpStreamFun, PVOID pUserData);
//开始压缩后修改录像码流
MVVSREC_API BOOL __stdcall  MVV_UpdateParameters(WORD nCardNo,DWORD m_iVBitRate);

#endif
